package com.supemarket.service.impl;

import java.util.List;

import com.supemarket.dao.AddSupemarketDao;
import com.supemarket.dao.BaseDao;
import com.supemarket.dao.DelSupemarketDao;
import com.supemarket.dao.SelectSupemarketDao;
import com.supemarket.dao.UpdateSupemarket;
import com.supemarket.dao.impl.AddSupemarketDaoimpl;
import com.supemarket.dao.impl.DelSupemarketDaoimpl;
import com.supemarket.dao.impl.SelectSupemarketDaoimpl;
import com.supemarket.dao.impl.UpdateSupemarketimpl;
import com.supemarket.entity.staff;
import com.supemarket.service.Allemployeesservice;
 
public class Allemployeesserviceimpl extends BaseDao implements Allemployeesservice{
	
	AddSupemarketDao addDao = new AddSupemarketDaoimpl();
	SelectSupemarketDao seleDao = new SelectSupemarketDaoimpl();
	
	UpdateSupemarket upDao = new UpdateSupemarketimpl();
	DelSupemarketDao delDao = new DelSupemarketDaoimpl();

	@Override
	public boolean staffadd(staff staff){
		int i=addDao.staffadd(staff);
		if(i>0)
		{//添加成功
			return true;
		}
		return false;
	}

	@Override
	public boolean staffdel(int id) {
		int i=delDao.staffdel(id);
		if(i>0)
		{//删除成功
			return true;
		}
		return false;
	}

	@Override
	public List<staff> staffs() {
		return seleDao.staffs();
	}

	@Override
	public boolean staffup(staff staff) {
		int i=upDao.staffup(staff);
		if(i>0)
		{//修改成功
			return true;
		}
		return false;
	}

}
